package socialMedia
{
	public class tweeterGetter
	{
		import mx.rpc.events.FaultEvent;
		import mx.rpc.events.ResultEvent;
		import mx.rpc.http.HTTPService;
		
		
		public static var userName:String;
		public static var count:int = 5;
		public var service:HTTPService = new HTTPService();
		public static var url_ = "http://search.twitter.com/search.rss?q=from%3A"+userName;
		public function tweeterGetter()
		{
		}
		
		public function tweetSearch(user)
		{
			service.url = url_;
			service.method = "GET";
			service.contentType = "application/x-www-form-urlencoded";
			service.resultFormat = "e4x";
			
			service.requestTimeout = 36;
			
			service.headers = null;
			service.send();
		}
		
		public static function resultHandler(evt:ResultEvent):void
		{
			var XML_ = evt.result as XML;
			trace(XML_);
		}
	
		
		
		/* sample -------------------------------------------------------
		
		<?xml version="1.0" encoding="UTF-8"?>
		<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:georss="http://www.georss.org/georss" xmlns:twitter="http://api.twitter.com">
		<channel>
		<title>Twitter / netgfx</title>
		<link>http://twitter.com/netgfx</link>
		<atom:link type="application/rss+xml" href="http://twitter.com/statuses/user_timeline/netgfx.rss?count=5" rel="self"/>
		<description>Twitter updates from Michael Dobekidis / netgfx.</description>
		<language>en-us</language>
		<ttl>40</ttl>
		<item>
		<title>netgfx: &#922;&#945;&#956;&#960;&#945;&#957;&#940;&#954;&#953; &#947;&#953;&#945; &#956;&#960;&#955;&#945;&#954; &#940;&#959;&#965;&#964; &#963;&#964;&#959; &#906;&#957;&#964;&#949;&#961;&#957;&#949;&#964;! http://t.co/40zdL0c</title>
		<description>netgfx: &#922;&#945;&#956;&#960;&#945;&#957;&#940;&#954;&#953; &#947;&#953;&#945; &#956;&#960;&#955;&#945;&#954; &#940;&#959;&#965;&#964; &#963;&#964;&#959; &#906;&#957;&#964;&#949;&#961;&#957;&#949;&#964;! http://t.co/40zdL0c</description>
		<pubDate>Sat, 13 Nov 2010 10:04:30 +0000</pubDate>
		<guid>http://twitter.com/netgfx/statuses/3387720768425985</guid>
		<link>http://twitter.com/netgfx/statuses/3387720768425985</link>
		<twitter:source>&lt;a href=&quot;http://twitter.com/tweetbutton&quot; rel=&quot;nofollow&quot;&gt;Tweet Button&lt;/a&gt;</twitter:source>
		<twitter:place/>
		</item>
		<item>
		<title>netgfx: Official Google Webmaster Central Blog: What a feeling! Even better indexing of SWF conten... http://t.co/vQQVtzE</title>
		<description>netgfx: Official Google Webmaster Central Blog: What a feeling! Even better indexing of SWF conten... http://t.co/vQQVtzE</description>
		<pubDate>Fri, 12 Nov 2010 19:09:52 +0000</pubDate>
		<guid>http://twitter.com/netgfx/statuses/3162578637299712</guid>
		<link>http://twitter.com/netgfx/statuses/3162578637299712</link>
		<twitter:source>&lt;a href=&quot;http://twitter.com/tweetbutton&quot; rel=&quot;nofollow&quot;&gt;Tweet Button&lt;/a&gt;</twitter:source>
		<twitter:place/>
		</item>
		<item>
		<title>netgfx: http://www.mozilla.com/en-US/mobile/beta/gomobile/#postcards</title>
		<description>netgfx: http://www.mozilla.com/en-US/mobile/beta/gomobile/#postcards</description>
		<pubDate>Tue, 09 Nov 2010 15:57:17 +0000</pubDate>
		<guid>http://twitter.com/netgfx/statuses/2026952676352000</guid>
		<link>http://twitter.com/netgfx/statuses/2026952676352000</link>
		<twitter:source>web</twitter:source>
		<twitter:place/>
		</item>
		<item>
		<title>netgfx: Cern : &#928;&#961;&#945;&#947;&#956;&#945;&#964;&#959;&#960;&#959;&#953;&#942;&#952;&#951;&#954;&#949; &#964;&#959; &#960;&#961;&#974;&#964;&#959; &#956;&#953;&#954;&#961;&#972; Big Bang http://t.co/fKVP43z</title>
		<description>netgfx: Cern : &#928;&#961;&#945;&#947;&#956;&#945;&#964;&#959;&#960;&#959;&#953;&#942;&#952;&#951;&#954;&#949; &#964;&#959; &#960;&#961;&#974;&#964;&#959; &#956;&#953;&#954;&#961;&#972; Big Bang http://t.co/fKVP43z</description>
		<pubDate>Mon, 08 Nov 2010 12:16:43 +0000</pubDate>
		<guid>http://twitter.com/netgfx/statuses/1609054975688704</guid>
		<link>http://twitter.com/netgfx/statuses/1609054975688704</link>
		<twitter:source>&lt;a href=&quot;http://twitter.com/tweetbutton&quot; rel=&quot;nofollow&quot;&gt;Tweet Button&lt;/a&gt;</twitter:source>
		<twitter:place/>
		</item>
		<item>
		<title>netgfx: &#920;&#945;&#973;&#956;&#945; &#964;&#951;&#962; &#966;&#973;&#963;&#951;&#962; &#951; &#947;&#941;&#957;&#957;&#951;&#963;&#951; 22 &#956;&#953;&#954;&#961;&#974;&#957; &#966;&#953;&#948;&#953;&#974;&#957; &#956;&#949; &#960;&#945;&#961;&#952;&#949;&#957;&#959;&#947;&#941;&#957;&#949;&#963;&#951;! http://t.co/s9m2A4o</title>
		<description>netgfx: &#920;&#945;&#973;&#956;&#945; &#964;&#951;&#962; &#966;&#973;&#963;&#951;&#962; &#951; &#947;&#941;&#957;&#957;&#951;&#963;&#951; 22 &#956;&#953;&#954;&#961;&#974;&#957; &#966;&#953;&#948;&#953;&#974;&#957; &#956;&#949; &#960;&#945;&#961;&#952;&#949;&#957;&#959;&#947;&#941;&#957;&#949;&#963;&#951;! http://t.co/s9m2A4o</description>
		<pubDate>Sat, 06 Nov 2010 04:00:16 +0000</pubDate>
		<guid>http://twitter.com/netgfx/statuses/759344614350848</guid>
		<link>http://twitter.com/netgfx/statuses/759344614350848</link>
		<twitter:source>&lt;a href=&quot;http://twitter.com/tweetbutton&quot; rel=&quot;nofollow&quot;&gt;Tweet Button&lt;/a&gt;</twitter:source>
		<twitter:place/>
		</item>
		</channel>
		
		</rss>

		
		------------------------------------  
		*/
		
		
	}
	
	
}